Carbon


LaunchDeskAccessory

Header: Processes.h Carbon status: Unsupported

Launches desk accessories. Use this function only when your application needs to launch a desk accessory for some reason other than the user’s choosing one from the Apple menu.

OSErr LaunchDeskAccessory (
    const FSSpec *pFileSpec, 
    ConstStr255Param pDAName
);
pFileSpec

A pointer to a file system specification of the resource fork to search for the specified desk accessory. Use this parameter to specify the file to search. Specify NULL as the value of pFileSpec if you want to search the current resource file and the resource files opened before it.

pDAName

The name of the 'DRVR' resource to launch. Specify the 'DRVR' resource name of the desk accessory to launch. Specify NULL as the value of pDAName if you want to launch the first 'DRVR' resource found in the file as returned by the Resource Manager. Because the LaunchDeskAccessory function opens the specified resource file for exclusive access, you cannot launch more than one desk accessory from the same resource file.

function result

A result code.

DISCUSSION

When the user chooses any Apple menu item that is not specific to your application, use the OpenDeskAcc function.

The LaunchDeskAccessory function searches the resource fork of the file specified by the pFileSpec parameter for the desk accessory with the 'DRVR' resource name specified in the pDAName parameter. If the 'DRVR' resource name is found, LaunchDeskAccessory launches the corresponding desk accessory. If the desk accessory is already open, it is brought to the front.

If the 'DRVR' resource is in a resource file that is already open by the current process or if the driver is in the System file and the Option key is pressed, LaunchDeskAccessory launches the desk accessory in the application’s heap. Otherwise, the desk accessory is given its own partition and launched in the system heap.

AVAILABILITY

Not supported in Carbon. Not available in CarbonLib, but available when InterfaceLib 7.1 or later is installed. Exported by InterfaceLib 7.1 and later.

CARBON NOTES

Carbon will not support LaunchDeskAccessory because desk accessories are no longer part of the Mac OS.


© 2000 Apple Computer, Inc. — (Last Updated 4/14/2000)